package com.atguigu.jxc.service;

import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.entity.Goods;

import java.util.Map;

public interface GoodsService {
    //获取库存
    Map<String, Object> listInventory(Integer page,
                                      Integer rows,
                                      String codeOrName,
                                      Integer goodsTypeId);

    // 商品的添加和修改
    ServiceVO saveOrUpdate(Goods goods, String goodsId);

    //删除商品
    ServiceVO deleteGoods(Integer goodsId);

    //获取商品编码
    ServiceVO getCode();

    //获取无库存列表
    Map<String, Object> getNoInventoryQuantity(Integer page,
                                               Integer rows,
                                               String nameOrCode);
    //获取有库存列表
    Map<String, Object> getHasInventoryQuantity(Integer page,
                                                Integer rows,
                                                String nameOrCode);
    //添加库存、修改数量或成本价
    ServiceVO saveStock(Integer goodsId,
                        Integer inventoryQuantity,
                        double purchasingPrice);

    ServiceVO deleteStock(Integer goodsId);

    //库存警告
    Map<String, Object> listAlarm();

}
